﻿package com.ljkj.zjf.common;

import java.io.InputStream;
import java.util.PropertyResourceBundle;

/**
 * 燃气服务器配置类
 * */
public class FireConfig {

	// 燃气用户端服务器地址
	public static String RESOURCE_URL;

	// 燃气运营端服务器地址
	public static String OPERATE_URL;
	
	public static String ALIPAY_URL;

	private static final String SERVER_REST_RESOURCE_URL = "server.rest.resource.url";
	private static final String SERVER_REST_OPERATE_URL = "server.rest.operate.url";
	private static final String SERVER_ALIPAY_URL = "server.alipay.url";

	private static final String CONF_FILE_NAME = "fire.properties";

	static {

		try {
			InputStream fis = FireConfig.class.getClassLoader()
					.getResourceAsStream(CONF_FILE_NAME);
			PropertyResourceBundle props = new PropertyResourceBundle(fis);
			RESOURCE_URL = props.getString(SERVER_REST_RESOURCE_URL);
			OPERATE_URL = props.getString(SERVER_REST_OPERATE_URL);
			ALIPAY_URL=props.getString(SERVER_ALIPAY_URL);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
